package com.onstar.cn.framework.network.http;

import com.onstar.cn.common.exception.HttpException;

public abstract class ResponseHandler {

	protected void onSuccess(String tag, String json, boolean isCancel) {
		if (!isCancel) {
			onSuccess(tag, json);
		}
	}

	protected void onError(String tag, HttpException e, boolean isCancel) {
		if (!isCancel) {
			onError(tag, e);
		}
	}

	public abstract void onSuccess(String tag, String json);

	public abstract void onError(String tag, HttpException e);
	
//	public abstract void onExpired();

}
